<template>
  <a-modal
    :width="modelWidth"
    :visible="visible"
    okText="确定"
    cancelText="取消"
    :destroy-on-close="true"
    @ok="submit"
    @cancel="handelColse"
  >
    <div>
      <div class="model_title my-font">
        {{ title }}
      </div>
      <div>
        <slot name="content"></slot>
      </div>
    </div>
  </a-modal>
</template>

<script>
import store from '@/store'
export default {
  props: {
    visible: {
      type: Boolean,
      required: true
    },
    title: {
      type: String,
      default: '基本信息'
    },
    modelWidth: {
      type: [Number, String],
      default: store.getters.modelWidth
    }
  },
  data () {
    return {
    }
  },
  methods: {
    submit () {
      this.$emit('submit')
    },
    handelColse () {
      this.$emit('close')
    }
  }
}
</script>
<style lang='less' scoped>

</style>
